import { Base } from '../utils/base.js';

class Agent extends Base {
    constructor() {
        super();
    }
	//推广码
	qrcode(callback){
		var params = {
		    url: 'agent/qrcode',
		    type: 'get',
		    loading: true,
			
		};
		this.apiRequest(params, callback);
	}
	//加业务员码
	qrcode1(callback){
		var params = {
		    url: 'agent/qrcode1',
		    type: 'get',
		    loading: true,
			
		};
		this.apiRequest(params, callback);
	}
	//合伙人/业务员申请详情
	get_apply(callback){
		var params = {
		    url: 'agent/applyInfo',
		    type: 'get',
		    loading: true,
			
		};
		this.apiRequest(params, callback);
	}
	apply_join(data,callback){
		var params = {
		    url: 'agent/applyJoin',
		    type: 'post',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//合伙人/业务员详情
	get_info(callback){
		var params = {
		    url: 'agent/index',
		    type: 'get',
		    loading: true,
			
		};
		this.apiRequest(params, callback);
	}
	//分销订单
	get_agent_order_list(data,callback){
		var params = {
		    url: 'agent/orderList',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//我的商家
	my_store_list(data,callback){
		var params = {
		    url: 'agent/storeList',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//我的业务员
	my_team_list(data,callback){
		var params = {
		    url: 'agent/teamList',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//上级
	my_parent(data,callback){
		var params = {
		    url: 'agent/parent',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//下级申请加入
	apply(data,callback){
		var params = {
		    url: 'agent/apply',
		    type: 'post',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	//上传团购产品
	daodian(data,callback){
		var params = {
		    url: 'agent/daodian',
		    type: 'post',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	
	//流水
	receive(data,callback){
		var params = {
		    url: 'agent/agentReceive',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	
	detailReceive(data,callback){
		var params = {
		    url: 'agent/agentDetail',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	
	//详情
	getInfo(callback){
		var params = {
		    url: 'agent/agentAllDetail',
		    type: 'get',
		    loading: true,
		};
		this.apiRequest(params, callback);
	}
	
	//添加业务员
	addLower(data,callback){
		var params = {
		    url: 'agent/addLower',
		    type: 'post',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	
	//添加业务员
	getTeam(data,callback){
		var params = {
		    url: 'agent/bindTeamList',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
	
	//添加业务员
	getStore(data,callback){
		var params = {
		    url: 'agent/agentStoreList',
		    type: 'get',
		    loading: true,
			data:data
		};
		this.apiRequest(params, callback);
	}
}

export { Agent };
